package net.lesscoding.shop.boot.feign.controller;

import net.lesscoding.shop.boot.feign.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author eleven
 * @date 2024/6/5 14:12
 * @apiNote
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/{name}")
    public String username(@PathVariable String name) {
        return userService.sayHello(name);
    }
}
